package com.hdoit.apollo.logical.stock.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.hdoit.apollo.logical.stock.dao.IStockCollocationDao;
import com.hdoit.apollo.logical.stock.model.StockCollocation;
import com.hdoit.apollo.logical.stock.service.IStockCollocationService;
import com.tennetcn.data.dao.base.impl.SuperService;
/**
 * @author      humaoshu
 * @email       
 * @createtime  2018年04月02日 11:48:23
 * @comment
 */
@Component
public class StockCollocationServiceImpl extends SuperService<StockCollocation> implements IStockCollocationService{
	
	@Autowired
	private IStockCollocationDao stockCollocationDao;

	@Override
	public List<StockCollocation> getStockCollocationByCargoId(String cargoId) {
		
		return stockCollocationDao.getStockCollocationByCargoId(cargoId);
	}

	@Override
	public boolean deleteByStockId(String stockId) {
		return stockCollocationDao.deleteByStockId(stockId);
	}

	@Override
	public boolean updateStockNo(String collocationId, Double num) {
		
		return stockCollocationDao.updateStockNo(collocationId, num);
	}

	@Override
	public boolean updateStockCollocationNo(String collocationId, Double num) {
		
		return stockCollocationDao.updateStockCollocationNo(collocationId, num);
	}

	@Override
	public StockCollocation queryModelByCollocationId(String collocationId) {
		
		return stockCollocationDao.queryModelByCollocationId(collocationId);
	}

}